<template>
  <div>列表页面
     <ul class="list-con"> 
         <li v-for="item in baokuanArr" :key="item.item_id">
             <router-link :to="`/item/${item.item_id}/${item.min_price}`">
                <div><img :src="item.over_image_url"></div>
                <div>{{item.item_name}}</div>
             </router-link>
         </li>
     </ul> 
  </div>
</template>

<script>
import axios from "axios";

export default {
 name:"list",
 data:function(){
     return{
         baokuanArr:[],
     }
 },
 mounted(){
     axios.get("./json/list.json").then((res)=>{
         console.log(res);
         this.baokuanArr = res.data.data.item_list;
     })
 }
}
</script>

<style scoped>
.list-con li{
    width: 100%;
    background: lemonchiffon;
    margin-bottom: 10px;
}
.list-con li div{
    text-align: left;
}
.list-con li img{
    width: 107px;
    height: auto;
}
</style>
